<!DOCTYPE html>
<html lang="en">
<head>
    <!-- <meta charset="UTF-8"> -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <style>
    .zhunge{
        width: 100px;
        height: 100px;
        border : 1px solid black;

    }
    
    /*
    a = 1 
    b = 2






    c = a  c =1 
    a = b  a =2
    b = c  b =1
    */
    </style>
    <title>Document</title>
</head>
<body>
    <div class="zhunge">1</div>
    <div class="zhunge">2</div>
    <div class="zhunge">3</div>
    <button class="btn">change</button>
   
    <script>
        var Btn = document.getElementsByClassName('btn')[0];
        var div2 = document.getElementsByClassName('zhunge')[1];
        var div3 = document.getElementsByClassName('zhunge')[2];
        Btn.onclick=function (){
            var val = div2.innerHTML
          //  alert(val)
            div2.innerHTML = div3.innerHTML
            div3.innerHTML = val 
        }

    </script>  
</body>
</html>